<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Test extends Model
{
    use SoftDeletes;

    protected $fillable = ['title', 'content'];

    // 根据用户 user_id 获取所有投票活动数据
    public static function getData()
    {
        return self::select(['id', 'title'])->get()->all();
    }
}